<?php if(isset($text)): ?>
    <div class="juosta">
        <?php echo link_to(get_domain_name()
                        , '@homepagef')?> &nbsp;/&nbsp;
        <?php echo ucfirst(__($text)); ?>
    </div>
<?php else: ?>
<?php if(isset($arParents)): ?>
<div class="juosta">
<?php if( count($arParents) < 3 ): ?>
    <?php echo link_to(
                    $arParents[2]->getName()
                    , ''
                )?>&nbsp;/
<?php else: ?>
    <?php for($j=2; $j<count($arParents); $j++): ?>
        <?php echo link_to(
                        $arParents[$j]->getName()
                        , 'tree/page?id=' . $arParents[$j]->getId()
                    )?>
            &nbsp;/
    <?php endfor; ?>
<?php endif; ?>
<?php echo link_to($obj->getName()
                , 'tree/page?id=' . $obj->getId());?>
</div>
<?php endif; ?>
<?php endif; ?>